package init

import (
	"fmt"
	"github.com/spf13/viper"
	"ke-srv/basic/config"
)

func InitViper() {
	viper.SetConfigFile("../../dev.yaml")
	err := viper.ReadInConfig()
	if err != nil {
		panic(err)
	}
	err = viper.Unmarshal(&config.AppConf)
	if err != nil {
		panic(err)
	}
	fmt.Println("动态配置读取成功", config.AppConf)
}
